package com.hiof.servercommunication.push;

import com.hiof.servercommunication.push.beans.LocationSendPacket;

/**
 * Created by IntelliJ IDEA.
 * User: manish
 * Date: 3/26/12
 * Time: 9:42 AM
 * To change this template use File | Settings | File Templates.
 */
public class LocationInfoSender implements Sender {

    LocationSendPacket liveLocationPacket;

    public LocationInfoSender(LocationSendPacket packet) {
        this.liveLocationPacket = packet;
    }

    @Override
    public boolean send() {
        try {
//            UserConfiguration userInfo = UserConfiguration.getInstance();
//            int userId = userInfo.getUserId();
//            int attendantId = userInfo.getAttendantId();
//            if (userInfo.getTypeOfAttendant() == TypeOfAttendant.ATHLETE) {
//                RestFulServiceManager.getInstance().sendAthleteLocationInfo(
//                        userId, attendantId, liveLocationPacket.getLat(),
//                        liveLocationPacket.getLng(),
//                        liveLocationPacket.getHeight(),
//                        liveLocationPacket.getSpeed());
//            } else if (userInfo.getTypeOfAttendant() == TypeOfAttendant.SUPPORT) {
//                RestFulServiceManager.getInstance().sendSupportLocationInfo(
//                        userId, attendantId, liveLocationPacket.getLat(),
//                        liveLocationPacket.getLng(),
//                        liveLocationPacket.getHeight(),
//                        liveLocationPacket.getSpeed());
//            }
        } catch (Exception ex) {
            return false;
        }
        return true;
    }
}
